package com.example.mapper;

import com.example.domain.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据用户名查询用户信息
     */
    User getUserByUsername(String username);

    /**
     * 获取用户列表信息
     */
    List<User> getUserList(String query);

    /**
     * 修改用户状态
     */
    void changeUserStatus(@Param("id") Integer id, @Param("status") Boolean status);
}